| User Guide > Getting Started > Tutorial: Create Your First Project |
This step-by-step tutorial will guide you to build a complete application that analyzes a Code 39 barcode from an image and output the value, type, location and confidence to the terminal.
For this tutorial, you can use any text editor (vim, gedit, emacs, etc.).
|
Copy Code
|
|
|---|---|
var bx = require('barcode-js'); |
|
|
Copy Code
|
|
|---|---|
console.log('\n...... Begin tutorial .........\n');
|
|
|
Copy Code
|
|
|---|---|
var params = { input: 'filePath/fileName.bmp', type: 'code39' }; |
|
|
Copy Code
|
|
|---|---|
bx.analyze(params, function (err, results) { if (err) { console.error("There was an error processing this image", err); return; } results.forEach(function(result) { console.log ('Result type ' + result.type); console.log ('\t' + 'value ' + result.value); }); }); |
|
|
Copy Code
|
|
|---|---|
$ node BXDemo |
|